﻿using System.ComponentModel;
using System.Windows.Controls;
using OpenFileTransfer.Wpf.Services;
using OpenFileTransfer.Wpf.ViewModels;

namespace OpenFileTransfer.Wpf.Views
{
    /// <summary>
    /// MainView.xaml 的交互逻辑
    /// </summary>
    // ReSharper disable once RedundantExtendsListEntry
    public partial class MainView : UserControl
    {
        public MainView(ICommunicationService communicationService)
        {
            InitializeComponent();

            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                DataContext = new MainViewModel(communicationService);
            }
        }
    }
}
